package com.gcit.seniorWish.web.common.constant.enums;

public enum UserDataScopeEnum {

	SELF_DEPT(1, "所在部门"), ALL(2, "全部数据");

	private int value;

	private String text;

	UserDataScopeEnum(int value, String text) {
		this.value = value;
		this.text = text;
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public static String valueOf(Integer value) {
		if (value == null) {
			return "";
		} else {
			for (UserDataScopeEnum s : UserDataScopeEnum.values()) {
				if (s.getValue() == value) {
					return s.getText();
				}
			}
			return "";
		}
	}
}
